package com.example.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * null
 * @TableName assessors
 */
@TableName(value ="assessors")
@Data
public class Assessors implements Serializable {
    /**
     * 成绩id
     */
    @TableId
    private Integer successId;

    /**
     * 课程id
     */
    private Integer courseId;

    /**
     * 学生ID
     */
    private Integer studentId;

    /**
     * 平时成绩
     */
    private Double peacetimesuccess;

    /**
     * 考试成绩
     */
    private Double achievement;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Assessors other = (Assessors) that;
        return (this.getSuccessId() == null ? other.getSuccessId() == null : this.getSuccessId().equals(other.getSuccessId()))
            && (this.getCourseId() == null ? other.getCourseId() == null : this.getCourseId().equals(other.getCourseId()))
            && (this.getStudentId() == null ? other.getStudentId() == null : this.getStudentId().equals(other.getStudentId()))
            && (this.getPeacetimesuccess() == null ? other.getPeacetimesuccess() == null : this.getPeacetimesuccess().equals(other.getPeacetimesuccess()))
            && (this.getAchievement() == null ? other.getAchievement() == null : this.getAchievement().equals(other.getAchievement()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSuccessId() == null) ? 0 : getSuccessId().hashCode());
        result = prime * result + ((getCourseId() == null) ? 0 : getCourseId().hashCode());
        result = prime * result + ((getStudentId() == null) ? 0 : getStudentId().hashCode());
        result = prime * result + ((getPeacetimesuccess() == null) ? 0 : getPeacetimesuccess().hashCode());
        result = prime * result + ((getAchievement() == null) ? 0 : getAchievement().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", successId=").append(successId);
        sb.append(", courseId=").append(courseId);
        sb.append(", studentId=").append(studentId);
        sb.append(", peacetimesuccess=").append(peacetimesuccess);
        sb.append(", achievement=").append(achievement);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}